package com.ives.launcher.view;

import com.ives.launcher.model.ItemInfo_Floder;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.LinearLayout;

public class View_CustomDialog extends GridView{
	EditText title;
	private ItemInfo_Floder floder;
	View_Cell cell;
	public View_CustomDialog(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public View_CustomDialog(Context context) {
		super(context);
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent ev) {
		if(ev.getAction()==MotionEvent.ACTION_DOWN){
			title.setFocusable(false);
			title.setFocusableInTouchMode(false);
			//保存标题
			floder.title = title.getText();
			cell.setTitle(floder.title.toString());
		}
		return super.onInterceptTouchEvent(ev);
	}

	public EditText getTitle() {
		return title;
	}

	public void setTitle(EditText title) {
		this.title = title;
	}

	public ItemInfo_Floder getFloder() {
		return floder;
	}

	public void setFloder(ItemInfo_Floder floder) {
		this.floder = floder;
	}

	public View_Cell getCell() {
		return cell;
	}

	public void setCell(View_Cell cell) {
		this.cell = cell;
	}

	
}
